home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2919 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 69 6f | 2e 55 57 69 6e 6e 69 70 |Path: io|.UWinnip|
|00000010| 65 67 2e 63 61 21 77 73 | 69 6d 70 73 6f 6e 0a 46 |eg.ca!ws|impson.F|
|00000020| 72 6f 6d 3a 20 42 69 6c | 6c 20 53 69 6d 70 73 6f |rom: Bil|l Simpso|
|00000030| 6e 20 3c 77 73 69 6d 70 | 73 6f 6e 40 75 77 69 6e |n <wsimp|son@uwin|
|00000040| 6e 69 70 65 67 2e 63 61 | 3e 0a 4e 65 77 73 67 72 |nipeg.ca|>.Newsgr|
|00000050| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |oups: co|mp.lang.|
|00000060| 63 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 73 |c.Subjec|t: Re: s|
|00000070| 77 61 70 20 68 69 67 68 | 20 61 6e 64 20 6c 6f 77 |wap high| and low|
|00000080| 20 31 36 20 62 69 74 73 | 3f 0a 44 61 74 65 3a 20 | 16 bits|?.Date: |
|00000090| 57 65 64 2c 20 32 34 20 | 4a 61 6e 20 31 39 39 36 |Wed, 24 |Jan 1996|
|000000a0| 20 31 37 3a 30 36 3a 35 | 38 20 2d 30 36 30 30 0a | 17:06:5|8 -0600.|
|000000b0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 54 68 |Organiza|tion: Th|
|000000c0| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |e Univer|sity of |
|000000d0| 4d 61 6e 69 74 6f 62 61 | 0a 4d 65 73 73 61 67 65 |Manitoba|.Message|
|000000e0| 2d 49 44 3a 20 3c 50 69 | 6e 65 2e 4f 53 46 2e 33 |-ID: <Pi|ne.OSF.3|
|000000f0| 2e 39 31 2e 39 36 30 31 | 32 34 31 37 30 31 31 31 |.91.9601|24170111|
|00000100| 2e 31 34 35 37 38 41 2d | 31 30 30 30 30 30 40 69 |.14578A-|100000@i|
|00000110| 6f 2e 55 57 69 6e 6e 69 | 70 65 67 2e 63 61 3e 0a |o.UWinni|peg.ca>.|
|00000120| 52 65 66 65 72 65 6e 63 | 65 73 3a 20 3c 50 69 6e |Referenc|es: <Pin|
|00000130| 65 2e 4f 53 46 2e 33 2e | 39 31 2e 39 36 30 31 31 |e.OSF.3.|91.96011|
|00000140| 35 31 37 34 39 32 31 2e | 31 39 37 34 32 41 2d 31 |5174921.|19742A-1|
|00000150| 30 30 30 30 30 40 69 6f | 2e 55 57 69 6e 6e 69 70 |00000@io|.UWinnip|
|00000160| 65 67 2e 63 61 3e 20 3c | 41 4c 55 4e 2e 43 48 41 |eg.ca> <|ALUN.CHA|
|00000170| 4d 50 49 4f 4e 2e 39 36 | 4a 61 6e 31 36 31 31 30 |MPION.96|Jan16110|
|00000180| 30 31 36 40 67 37 32 34 | 30 30 36 35 2e 62 72 69 |016@g724|0065.bri|
|00000190| 64 67 65 2e 62 73 74 2e | 62 6c 73 2e 63 6f 6d 3e |dge.bst.|bls.com>|
|000001a0| 20 3c 50 69 6e 65 2e 4f | 53 46 2e 33 2e 39 31 2e | <Pine.O|SF.3.91.|
|000001b0| 39 36 30 31 31 37 31 34 | 33 35 33 39 2e 31 34 31 |96011714|3539.141|
|000001c0| 34 41 2d 31 30 30 30 30 | 30 40 69 6f 2e 55 57 69 |4A-10000|0@io.UWi|
|000001d0| 6e 6e 69 70 65 67 2e 63 | 61 3e 20 3c 38 32 31 39 |nnipeg.c|a> <8219|
|000001e0| 32 37 38 39 39 73 6e 7a | 40 67 65 6e 65 73 69 73 |27899snz|@genesis|
|000001f0| 2e 64 65 6d 6f 6e 2e 63 | 6f 2e 75 6b 3e 20 3c 34 |.demon.c|o.uk> <4|
|00000200| 64 70 6b 64 65 24 68 33 | 6e 40 6e 73 2e 52 65 7a |dpkde$h3|n@ns.Rez|
|00000210| 6f 4e 65 74 2e 4e 45 54 | 3e 0a 4e 4e 54 50 2d 50 |oNet.NET|>.NNTP-P|
|00000220| 6f 73 74 69 6e 67 2d 48 | 6f 73 74 3a 20 69 6f 2e |osting-H|ost: io.|
|00000230| 75 77 69 6e 6e 69 70 65 | 67 2e 63 61 0a 4d 69 6d |uwinnipe|g.ca.Mim|
|00000240| 65 2d 56 65 72 73 69 6f | 6e 3a 20 31 2e 30 0a 43 |e-Versio|n: 1.0.C|
|00000250| 6f 6e 74 65 6e 74 2d 54 | 79 70 65 3a 20 54 45 58 |ontent-T|ype: TEX|
|00000260| 54 2f 50 4c 41 49 4e 3b | 20 63 68 61 72 73 65 74 |T/PLAIN;| charset|
|00000270| 3d 55 53 2d 41 53 43 49 | 49 0a 49 6e 2d 52 65 70 |=US-ASCI|I.In-Rep|
|00000280| 6c 79 2d 54 6f 3a 20 3c | 34 64 70 6b 64 65 24 68 |ly-To: <|4dpkde$h|
|00000290| 33 6e 40 6e 73 2e 52 65 | 7a 6f 4e 65 74 2e 4e 45 |3n@ns.Re|zoNet.NE|
|000002a0| 54 3e 20 0a 0a 3e 20 4e | 6f 77 20 74 68 61 74 20 |T> ..> N|ow that |
|000002b0| 49 20 73 65 65 20 74 68 | 65 20 6f 72 69 67 69 6e |I see th|e origin|
|000002c0| 61 6c 20 70 6f 73 74 65 | 72 20 77 61 73 20 69 6e |al poste|r was in|
|000002d0| 20 66 61 63 74 20 75 73 | 69 6e 67 20 74 69 6d 65 | fact us|ing time|
|000002e0| 20 74 6f 20 73 65 65 64 | 20 74 68 65 20 0a 3e 20 | to seed| the .> |
|000002f0| 72 61 6e 64 6f 6d 20 6e | 75 6d 62 65 72 20 67 65 |random n|umber ge|
|00000300| 6e 65 72 61 74 6f 72 2c | 20 49 27 6d 20 6e 6f 74 |nerator,| I'm not|
|00000310| 20 71 75 69 74 65 20 73 | 75 72 65 20 77 68 61 74 | quite s|ure what|
|00000320| 20 74 68 65 20 70 72 6f | 62 6c 65 6d 20 69 73 2e | the pro|blem is.|
|00000330| 20 20 54 68 65 20 0a 3e | 20 63 6c 6f 73 65 73 6e | The .>| closesn|
|00000340| 65 73 73 20 6f 66 20 6f | 6e 65 20 73 65 65 64 20 |ess of o|ne seed |
|00000350| 74 6f 20 61 6e 6f 74 68 | 65 72 20 73 65 65 64 20 |to anoth|er seed |
|00000360| 69 6e 20 6e 6f 20 77 61 | 79 20 69 6d 70 6c 69 65 |in no wa|y implie|
|00000370| 73 20 74 68 61 74 20 74 | 68 65 20 74 77 6f 20 0a |s that t|he two .|
|00000380| 3e 20 72 61 6e 64 6f 6d | 20 73 65 71 75 65 6e 63 |> random| sequenc|
|00000390| 65 73 20 73 6f 20 70 72 | 6f 64 75 63 65 64 20 77 |es so pr|oduced w|
|000003a0| 69 6c 6c 20 62 65 20 22 | 63 6c 6f 73 65 20 74 6f |ill be "|close to|
|000003b0| 22 20 65 61 63 68 20 6f | 74 68 65 72 2e 0a 3e 20 |" each o|ther..> |
|000003c0| 0a 3e 20 41 20 64 69 66 | 66 65 72 65 6e 63 65 20 |.> A dif|ference |
|000003d0| 6f 66 20 6f 6e 6c 79 20 | 6f 6e 65 20 69 6e 20 74 |of only |one in t|
|000003e0| 68 65 20 76 61 6c 75 65 | 20 67 69 76 65 6e 20 74 |he value| given t|
|000003f0| 6f 20 74 68 65 20 73 65 | 65 64 69 6e 67 20 66 75 |o the se|eding fu|
|00000400| 6e 63 74 69 6f 6e 20 0a | 3e 20 63 61 75 73 65 73 |nction .|> causes|
|00000410| 20 61 20 74 6f 74 61 6c | 6c 79 20 64 69 66 66 65 | a total|ly diffe|
|00000420| 72 65 6e 74 20 73 65 71 | 75 65 6e 63 65 73 20 6f |rent seq|uences o|
|00000430| 66 20 6e 75 6d 62 65 72 | 73 20 74 6f 20 62 65 20 |f number|s to be |
|00000440| 70 72 6f 64 75 63 65 64 | 2e 0a 3e 20 0a 4d 6f 73 |produced|..> .Mos|
|00000450| 74 20 52 4e 47 73 20 28 | 65 2e 67 2e 20 63 6f 6d |t RNGs (|e.g. com|
|00000460| 6d 6f 6e 6c 79 20 75 73 | 65 64 20 4c 43 47 73 29 |monly us|ed LCGs)|
|00000470| 20 61 72 65 20 6e 6f 74 | 20 22 63 6f 6d 70 6c 65 | are not| "comple|
|00000480| 74 65 6c 79 20 72 61 6e | 64 6f 6d 22 20 61 6e 64 |tely ran|dom" and|
|00000490| 0a 73 6f 20 73 61 79 0a | 73 72 61 6e 64 28 78 29 |.so say.|srand(x)|
|000004a0| 0a 72 61 6e 64 28 29 0a | 61 6e 64 0a 73 72 61 6e |.rand().|and.sran|
|000004b0| 64 28 79 29 0a 72 61 6e | 64 28 29 0a 70 72 6f 64 |d(y).ran|d().prod|
|000004c0| 75 63 65 73 20 61 20 76 | 61 6c 75 65 20 6f 6e 20 |uces a v|alue on |
|000004d0| 74 68 65 20 74 77 6f 20 | 72 75 6e 73 20 74 68 61 |the two |runs tha|
|000004e0| 74 20 69 73 20 6e 6f 74 | 20 61 20 75 6e 69 66 6f |t is not| a unifo|
|000004f0| 72 6d 20 72 61 6e 64 6f | 6d 20 64 65 76 69 61 74 |rm rando|m deviat|
|00000500| 65 2e 0a 49 6e 20 70 6c | 61 69 6e 20 6c 61 6e 67 |e..In pl|ain lang|
|00000510| 75 61 67 65 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |uage, fo|r exampl|
|00000520| 65 2c 20 74 68 65 20 32 | 20 72 75 6e 73 20 6d 61 |e, the 2| runs ma|
|00000530| 79 20 62 6f 74 68 20 62 | 65 20 63 65 72 74 61 69 |y both b|e certai|
|00000540| 6e 20 74 6f 0a 70 72 6f | 64 75 63 65 20 72 61 6e |n to.pro|duce ran|
|00000550| 64 28 29 2f 52 41 4e 44 | 5f 4d 41 58 20 3c 2e 35 |d()/RAND|_MAX <.5|
|00000560| 2e 20 20 49 6e 64 65 65 | 64 20 74 68 69 73 20 69 |. Indee|d this i|
|00000570| 73 20 74 68 65 20 70 72 | 6f 62 6c 65 6d 20 49 20 |s the pr|oblem I |
|00000580| 6f 62 73 65 72 76 65 64 | 0a 65 6d 70 69 72 69 63 |observed|.empiric|
|00000590| 61 6c 6c 79 2e 0a 0a 54 | 68 65 20 70 72 6f 62 6c |ally...T|he probl|
|000005a0| 65 6d 20 77 69 74 68 20 | 6d 6f 73 74 20 72 6e 64 |em with |most rnd|
|000005b0| 20 23 20 67 65 6e 65 72 | 61 74 6f 72 73 20 69 73 | # gener|ators is|
|000005c0| 20 77 69 74 68 20 6e 6f | 6e 72 61 6e 64 6f 6d 20 | with no|nrandom |
|000005d0| 6c 6f 77 20 62 69 74 73 | 2e 0a 0a 42 69 6c 6c 20 |low bits|...Bill |
|000005e0| 53 69 6d 70 73 6f 6e 0a | |Simpson.| |
+--------+-------------------------+-------------------------+--------+--------+